
	<div class="container">
		<table id="mytable">
			<thead>
				<tr>
				<th data-checkbox="true"></th>
				<th data-field="name">部门名称</th>
				</tr>
			</thead> 
		</table>
	</div>
<script type="text/javascript">
	$(function(){
		$('#mytable').datagrid({
			path:'dept',
			pagination:false,
			 //在哪一列展开树形
	        treeShowField: 'name',
	        //指定父id列
	        parentIdField: 'parentId',
			buttons:[$.fn.datagrid.toolbar.buttons.add,$.fn.datagrid.toolbar.buttons.edit,$.fn.datagrid.toolbar.buttons.remove],
			search:false,
			/* 刷新按钮 */
			/* showRefresh:false, */
			/* 不同方法显示 */
			showToggle:false,		
 			showColumns:false,		
			pagination:false,
			$table.treegrid({
				treeColumn:1,
			    expanderExpandedClass: 'glyphicon glyphicon-chevron-down',
			    expanderCollapsedClass: 'glyphicon glyphicon-chevron-right',
			});
			
		})	
	})
</script>
